package org.example.rubbish.config;

import com.baomidou.mybatisplus.autoconfigure.ConfigurationCustomizer;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
@MapperScan("org.example.rubbish.mapper")
public class MyBatisConfig {
    @Bean
    public ConfigurationCustomizer typeHandlerCustomizer() {
        return configuration -> {
            configuration.getTypeHandlerRegistry()
                    .register(org.example.rubbish.handler.JsonTypeHandler.class);
        };
    }
}